
using System;
using System.Collections.Generic;
using System.Text;

namespace ScrewTurn.Wiki {

	/// <summary>
	/// Represents a Change.
	/// </summary>
	public class RecentChange {

		private string page;
		private string title;
		private DateTime dateTime;
		private string user;
		private Change change;
		private string descr;

		/// <summary>
		/// Initializes a new instance of the <b>RecentChange</b> class.
		/// </summary>
		/// <param name="page">The Page Name.</param>
		/// <param name="title">The Page Title.</param>
		/// <param name="dateTime">The Date/Time.</param>
		/// <param name="user">The User.</param>
		/// <param name="change">The Change.</param>
		/// <param name="descr">The Description (optional).</param>
		public RecentChange(string page, string title, DateTime dateTime, string user, Change change, string descr) {
			this.page = page;
			this.title = title;
			this.dateTime = dateTime;
			this.user = user;
			this.change = change;
			this.descr = descr;
		}

		/// <summary>
		/// Gets the Page Name.
		/// </summary>
		public string Page {
			get { return page; }
		}

		/// <summary>
		/// Gets the Page Title.
		/// </summary>
		public string Title {
			get { return title; }
		}

		/// <summary>
		/// Gets the Date/Time.
		/// </summary>
		public DateTime DateTime {
			get { return dateTime; }
		}

		/// <summary>
		/// Gets the User.
		/// </summary>
		public string User {
			get { return user; }
		}

		/// <summary>
		/// Gets the Change.
		/// </summary>
		public Change Change {
			get { return change; }
		}

		/// <summary>
		/// Gets the Description (optional).
		/// </summary>
		public string Description {
			get { return descr; }
		}

	}

	/// <summary>
	/// Lists legal Changes.
	/// </summary>
	public enum Change {
		/// <summary>
		/// A Page was updated.
		/// </summary>
		PageUpdated,
		/// <summary>
		/// A Page was deleted.
		/// </summary>
		PageDeleted,
		/// <summary>
		/// A Page was rolled back.
		/// </summary>
		PageRolledBack,
		/// <summary>
		/// A Page was renamed.
		/// </summary>
		PageRenamed
	}

}
